<template>
    <div style="text-align:left"><el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
  <el-form-item label="车主" prop="name">
    张三
  </el-form-item>
 
   <el-form-item label="车辆信息" prop="name"><br/>
    
<el-upload
  class="avatar-uploader"
  action="https://jsonplaceholder.typicode.com/posts/"
  :show-file-list="false"
  :on-success="handleAvatarSuccess"
  :before-upload="beforeAvatarUpload">
  <img v-if="imageUrl" :src="imageUrl" class="avatar">
  <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
  </el-form-item>
  <el-form-item label="车辆照片" prop="name"><br/>
    
<el-upload
  class="avatar-uploader"
  action="https://jsonplaceholder.typicode.com/posts/"
  :show-file-list="false"
  :on-success="handleAvatarSuccess"
  :before-upload="beforeAvatarUpload">
  <img v-if="imageUrl" :src="imageUrl" class="avatar">
  <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
  </el-form-item>
  
 
  <el-form-item>
    <el-button type="primary" @click="submitForm('ruleForm')">提交审核</el-button>
    <el-button @click="resetForm('ruleForm')">取消申请</el-button>
  </el-form-item>
</el-form></div>
</template>

<style>
  .avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }
  .avatar-uploader .el-upload:hover {
    border-color: #409EFF;
  }
  .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 178px;
    height: 178px;
    line-height: 178px;
    text-align: center;
  }
  .avatar {
    width: 178px;
    height: 178px;
    display: block;
  }
</style>

<script>
export default {
    name:"userrenter",
    data() {
        return{
            ruleForm:{},
            rules:""
        }
    },
    methods: {
         submitForm() {
          alert("审核中")
          this.$router.push({name:"usercar"})
      },
      resetForm() {
         this.$router.push({name:"userIndex"})
      }
    }
}
</script>